<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">





<title>Log4net 简明手册 - Q.yuhen</title>
<meta name="robots" content="follow,index">

<link rel="alternate" type="application/rss+xml" title="Q.yuhen" href="http://www.rainsts.net/feed.asp">


<link rel="stylesheet" type="text/css" href="index.css" media="all">
</head>
<body>
<div id="wrapper">
<div id="innerWrapper">

<div id="header">
<div id="innerHeader">
  <div id="blogLogo"><img src="logo.gif" id="logo" alt="Logo"></div>
  <div class="blog-header">
    <h1 class="blog-title"><a href="http://www.rainsts.net/">Q.yuhen</a></h1>
    <div class="blog-desc">秋雨漏更夜，琴音动心痕。RainTrail Studio.China 2000-2009</div>
  </div>
  <div id="menu">
    <ul>
    <li><a href="http://www.rainsts.net/default.asp">首页</a></li>
    <li><a href="http://www.rainsts.net/default.asp?selected=true">推荐日志</a></li>
    <li><a href="http://www.rainsts.net/gbook.asp">留言簿</a></li>
    <li><a href="javascript:showHideSidebar()">隐藏/显示侧边栏</a></li>
    <li><a href="javascript:showLogin()">登录</a></li>
    </ul>
  </div>
</div>
</div>

<div id="mainWrapper">
<div id="content" class="content">
<div id="innerContent">
  <div class="article-top">
    <div class="prev-article"><a href="http://www.rainsts.net/article.asp?id=487" title="[Castle AR] 5. Base Relations">« [Castle AR] 5. Base...</a></div>
    <div class="next-article"><a href="http://www.rainsts.net/article.asp?id=489" title="Application.OpenForms">Application.OpenFor... »</a></div>
    <div class="category-label"><a href="http://www.rainsts.net/default.asp?cat=28">分类: OpenSource FX</a></div>
  </div>
  <div class="textbox">
    <div class="textbox-title">
      
      <h4>Log4net 简明手册</h4>
      <div class="textbox-label">
      [ 2007-05-22 13:09:47 | 作者: <a href="http://www.rainsts.net/user.asp?act=view&amp;id=2">yuhen</a> ]
      
      </div>
    </div>
    <div class="textbox-fontsize">
      字号:
      <a href="javascript:setFontSize(14)" title="字号: 大">大</a> |
      <a href="javascript:setFontSize(11)" title="字号: 中">中</a> |
      <a href="javascript:setFontSize(9)" title="字号: 小">小</a>
    </div>
    <div id="textboxContent" class="textbox-content">
    常见面，却不怎么用，究其原因还是觉得太复杂了点。不过，这东西出现次数越来越频繁，也只好写点东西，以备后用。本文仅对 Log4net 的使用做个简要说明，所有涉及到扩展和开发的部分一概忽略。<br><br>使用 Log4net，需要熟悉的东东有 Logger、Appender 以及 Layout。Logger 是日志记录器，我们使用其相关方法来完成日志记录；Appender 用于设置日志的存储方式和位置，Logger 的配置中会绑定一个或多个 Appender；Layout 关联具体的 Appender，用于设置日志字符串的格式。<br><br><b>1. Logger</b><br><br>所有的记录器都必须实现 ILog 接口，该接口提供日志记录所需的大量方法。<br><div class="code">public interface ILog : ILoggerWrapper<br>{<br>&nbsp;&nbsp;void Debug(...);<br>&nbsp;&nbsp;void Error(...);<br>&nbsp;&nbsp;void Fatal(...);<br>&nbsp;&nbsp;void Info(...);<br>&nbsp;&nbsp;void Warn(...);<br><br>&nbsp;&nbsp;bool IsDebugEnabled { get; }<br>&nbsp;&nbsp;bool IsErrorEnabled { get; }<br>&nbsp;&nbsp;bool IsFatalEnabled { get; }<br>&nbsp;&nbsp;bool IsInfoEnabled { get; }<br>&nbsp;&nbsp;bool IsWarnEnabled { get; }<br>}</div><br>通常情况下，我们通过 LogManager.GetLogger() 来获取一个记录器。LogManager 内部维护一个 hashtable，保存新创建 Logger 引用，下次需要时直接从 hashtable 获取其实例。<br><div class="code">ILog log = LogManager.GetLogger(this.GetType());<br>log.Debug("aaaaaaaaaaaaaaa");</div><br>所有 Logger 的参数设置都直接或间接继承自 root，其继承关系类似 namespace。比如，名为 "MyLogger.X.Y" 参数设置继承自 "MyLogger.X"。当我们创建 "MyLooger.X.Y" 记录器时，会在配置文件找该名称的记录器设置，如果没找到，则按继承关系向上查找，直到 root。因此，在创建 Logger 时，我们通常使用类型名称做为记录器的名字，缺省情况下，它会使用 root 或某一个父配置，但在需要的时候，我们随时可以为具体的类型添加一个更加 "详细" 的配置。<br><div class="code">&lt;?xml version="1.0" encoding="utf-8" ?&gt; <br>&lt;log4net&gt;<br>&nbsp;&nbsp;&lt;appender name="Console" type="log4net.Appender.ConsoleAppender"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;layout type="log4net.Layout.PatternLayout"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;conversionPattern value="%5level [%thread] (%file:%line) - %message%newline" /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/layout&gt;<br>&nbsp;&nbsp;&lt;/appender&gt;<br><br>&nbsp;&nbsp;&lt;logger name="Learn.Library.Log4netTest"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;level value="ALL" /&gt;<br>&nbsp;&nbsp;&lt;/logger&gt;<br><br>&nbsp;&nbsp;&lt;root&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;level value="OFF" /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;appender-ref ref="Console" /&gt;<br>&nbsp;&nbsp;&lt;/root&gt;<br>&lt;/log4net&gt;</div> <br><br>在创建 Logger 设置时，需要注意 "level" 参数。Log4net 允许我们通过该参数调整日志记录级别，只有高于或等于该级别的日志才会被记录下来。比如在代码调试阶段，我们可能希望记录所有的信息，而在部署阶段，我们只希望记录级别更高的错误信息。这个参数的好处是允许我们在不修改代码的前提下，随时调整记录级别。<br><div class="code">(高) OFF &gt; FATAL &gt; ERROR &gt; WARN &gt; INFO &gt; DEBUG &gt; ALL (低)</div><br>"appender-ref" 参数用于绑定一个或多个具体的 Appender。<br><div class="code">&lt;?xml version="1.0" encoding="utf-8" ?&gt;<br>&lt;log4net&gt;<br>&nbsp;&nbsp;&lt;appender name="Console" type="log4net.Appender.ConsoleAppender"&gt;<br>&nbsp;&nbsp;&lt;/appender&gt;<br><br>&nbsp;&nbsp;&lt;appender name="RollingFile" type="log4net.Appender.RollingFileAppender"&gt;<br>&nbsp;&nbsp;&lt;/appender&gt;<br><br>&nbsp;&nbsp;&lt;root&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;level value="DEBUG" /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;appender-ref ref="Console" /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;appender-ref ref="RollingFile" /&gt;<br>&nbsp;&nbsp;&lt;/root&gt;<br>&lt;/log4net&gt;</div><br><b>2. Appender / Layout</b><br><br>Log4net 提供了大量的 Appender，最常用的包括 AdoNetAppender、AspNetTraceAppender、ConsoleAppender、FileAppender、OutputDebugStringAppender。每种 Appender 都有特定一些参数，使用时直接从 《Log4net 手册》的示例中拷贝过去，就OK了。(代码摘自 Log4net 手册)<br><br><b>(1) AspNetTraceAppender</b><br><div class="code">&lt;appender name="AspNetTraceAppender" type="log4net.Appender.AspNetTraceAppender" &gt;<br>&nbsp;&nbsp;&lt;layout type="log4net.Layout.PatternLayout"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" /&gt;<br>&nbsp;&nbsp;&lt;/layout&gt;<br>&lt;/appender&gt;</div><br><b>(2) ConsoleAppender</b><br><div class="code">&lt;appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender"&gt;<br>&nbsp;&nbsp;&lt;layout type="log4net.Layout.PatternLayout"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" /&gt;<br>&nbsp;&nbsp;&lt;/layout&gt;<br>&lt;/appender&gt;</div><br><b>(3) OutputDebugStringAppender</b><br><div class="code">&lt;appender name="OutputDebugStringAppender" type="log4net.Appender.OutputDebugStringAppender" &gt;<br>&nbsp;&nbsp;&lt;layout type="log4net.Layout.PatternLayout"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" /&gt;<br>&nbsp;&nbsp;&lt;/layout&gt;<br>&lt;/appender&gt;</div><br><b>(4) FileAppender</b><br><div class="code">&lt;appender name="FileAppender" type="log4net.Appender.FileAppender"&gt;<br>&nbsp;&nbsp;&lt;file value="log-file.txt" /&gt;<br>&nbsp;&nbsp;&lt;appendToFile value="true" /&gt;<br>&nbsp;&nbsp;&lt;layout type="log4net.Layout.PatternLayout"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" /&gt;<br>&nbsp;&nbsp;&lt;/layout&gt;<br>&lt;/appender&gt;</div><br>有关 Layout 详细信息，请参考 Log4net 相关文档，本文不做详述。<br><br><b>3. Configuration</b><br><br>Log4net 的配置方式十分灵活，即可以写到应用程序配置文件中，也可以使用独立配置文件。同时它还提供了监测配置文件变化的功能，这样我们随时可以调整配置，而无须重启应用程序。<br><br><b>(1) 使用 app.config / web.config</b><br><br>app.config / web.config<div class="code">&lt;?xml version="1.0" encoding="utf-8" ?&gt;<br>&lt;configuration&gt;<br>&nbsp;&nbsp;&lt;configSections&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /&gt;<br>&nbsp;&nbsp;&lt;/configSections&gt;<br><br>&nbsp;&nbsp;&lt;log4net&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;appender name="Console" type="log4net.Appender.ConsoleAppender"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;layout type="log4net.Layout.PatternLayout"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;conversionPattern value="%5level [%thread] (%file:%line) - %message%newline" /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/layout&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/appender&gt;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;root&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;level value="DEBUG" /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;appender-ref ref="Console" /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/root&gt;<br>&nbsp;&nbsp;&lt;/log4net&gt;<br>&lt;/configuration&gt;</div><br>使用代码初始化配置。<div class="code">log4net.Config.XmlConfigurator.Configure();</div><br><b>(2) 使用自定义配置文件</b><br><br>test.log4net<div class="code">&lt;?xml version="1.0" encoding="utf-8" ?&gt; <br>&lt;log4net&gt;<br>&nbsp;&nbsp;&lt;appender name="Console" type="log4net.Appender.ConsoleAppender"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;layout type="log4net.Layout.PatternLayout"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;conversionPattern value="%5level [%thread] (%file:%line) - %message%newline" /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/layout&gt;<br>&nbsp;&nbsp;&lt;/appender&gt;<br>&nbsp;&nbsp;<br>&nbsp;&nbsp;&lt;root&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;level value="DEBUG" /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;appender-ref ref="Console" /&gt;<br>&nbsp;&nbsp;&lt;/root&gt;<br>&lt;/log4net&gt;</div><br>使用代码初始化配置。<div class="code">log4net.Config.XmlConfigurator.Configure(new FileInfo("test.log4net"));</div><br>使用 XmlConfigurator.ConfigureAndWatch() 方法除了初始化配置外，还会监测配置文件的变化，一旦发生修改，将自动刷新配置。<br><br><b>(3) XmlConfiguratorAttribute</b><br><br>我们还可以使用 XmlConfiguratorAttribute 代替 XmlConfigurator.Config()/ConfigureAndWatch()，ConfiguratorAttribute 用于定义与 Assembly 相关联的配置文件名。<br><br>方式1: 关联到 test.log4net，并监测变化。<div class="code">[assembly: log4net.Config.XmlConfigurator(ConfigFile="test.log4net", Watch=true)]</div><br>方式2: 关联到 test.exe.log4net (或 test.dll.log4net，文件名前缀为当前程序集名称)，并监测变化。<div class="code">[assembly: log4net.Config.XmlConfigurator(ConfigFileExtension="log4net", Watch=true)]</div>
      <div class="editmark">[最后修改由 yuhen， 于 2007-05-22 13:28:13]</div>
    
      <div class="textbox-urls">
        <img src="rss_comment.png" class="meta-button" alt="评论Feed">
        <b>评论Feed:</b><span> <a href="http://www.rainsts.net/feed.asp?q=comment&amp;id=488" class="smarterwiki-linkify">http://www.rainsts.net/feed.asp?q=comment&amp;id=488</a>
      </span></div>
    </div>
  </div>
  <br>
  
  <a name="comments"></a>
  <div id="commentWrapper" class="comment-wrapper">
    
    <div class="no-comment-box">这篇日志没有评论。</div>
  
  </div>
  <br>
  <a name="commentbox"></a>
  
<div id="commentForm">

<form name="inputform" method="post" action="http://www.rainsts.net/comment.asp?act=save&amp;logid=488">
<table class="formbox-comment" align="center" border="0" cellpadding="4" cellspacing="1" width="100%">
  <tbody><tr>
    <td colspan="2" class="formbox-comment-title">发表评论</td>
  </tr>
  <tr>
    <td class="formbox-comment-rowheader" width="140">
      <div class="panel-smilies">
        <div class="panel-smilies-title">表情图标</div>
        <div class="panel-smilies-content">
        
          <a href="javascript:insertSmilies('[smile]')"><img src="icon_smile.gif" alt="[smile]"></a>
          
          <a href="javascript:insertSmilies('[confused]')"><img src="icon_confused.gif" alt="[confused]"></a>
          
          <a href="javascript:insertSmilies('[cool]')"><img src="icon_cool.gif" alt="[cool]"></a>
          
          <a href="javascript:insertSmilies('[cry]')"><img src="icon_cry.gif" alt="[cry]"></a>
          <br>

          <a href="javascript:insertSmilies('[eek]')"><img src="icon_eek.gif" alt="[eek]"></a>
          
          <a href="javascript:insertSmilies('[angry]')"><img src="icon_angry.gif" alt="[angry]"></a>
          
          <a href="javascript:insertSmilies('[wink]')"><img src="icon_wink.gif" alt="[wink]"></a>
          
          <a href="javascript:insertSmilies('[sweat]')"><img src="icon_sweat.gif" alt="[sweat]"></a>
          <br>

          <a href="javascript:insertSmilies('[lol]')"><img src="icon_lol.gif" alt="[lol]"></a>
          
          <a href="javascript:insertSmilies('[stun]')"><img src="icon_stun.gif" alt="[stun]"></a>
          
          <a href="javascript:insertSmilies('[razz]')"><img src="icon_razz.gif" alt="[razz]"></a>
          
          <a href="javascript:insertSmilies('[redface]')"><img src="icon_redface.gif" alt="[redface]"></a>
          <br>

          <a href="javascript:insertSmilies('[rolleyes]')"><img src="icon_rolleyes.gif" alt="[rolleyes]"></a>
          
          <a href="javascript:insertSmilies('[sad]')"><img src="icon_sad.gif" alt="[sad]"></a>
          
          <a href="javascript:insertSmilies('[yes]')"><img src="icon_yes.gif" alt="[yes]"></a>
          
          <a href="javascript:insertSmilies('[no]')"><img src="icon_no.gif" alt="[no]"></a>
          <br>

          <a href="javascript:insertSmilies('[heart]')"><img src="icon_heart.gif" alt="[heart]"></a>
          
          <a href="javascript:insertSmilies('[star]')"><img src="icon_star.gif" alt="[star]"></a>
          
          <a href="javascript:insertSmilies('[music]')"><img src="icon_music.gif" alt="[music]"></a>
          
          <a href="javascript:insertSmilies('[idea]')"><img src="icon_idea.gif" alt="[idea]"></a>
          <br>

        </div>
      </div>
      <div style="font-weight: normal; text-align: left;">
        <input name="e_ubb" value="true" checked="checked" type="checkbox">  UBB代码<br>
        <input name="e_autourl" value="true" checked="checked" type="checkbox"> 转换链接<br>
        <input name="e_smilies" value="true" checked="checked" type="checkbox"> 表情图标<br>
        <input name="comm_hidden" value="true" type="checkbox"> 悄悄话
      </div>
    </td>
    <td class="formbox-comment-content" valign="top">
      
      <div style="padding-bottom: 5px;">
        用户名: <input value="" name="comm_username" size="12" maxlength="24" class="text" type="text">&nbsp;
        密码: <input name="comm_password" size="12" maxlength="16" class="text" type="password">&nbsp;
        
      </div>
      
      <div style="padding-bottom: 5px;">
        <input value="" name="scode" size="4" maxlength="4" class="text" type="text">
        <img src="scode.asp" alt="验证码">
        <span class="comment-text">* 请输入验证码</span>
      </div>
      
      <textarea name="message" cols="64" rows="10" id="message" style="width: 100%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);CtrlEnter();"></textarea>
      
      <div style="padding-top: 10px;">
        <input name="btnSubmit" value=" 提交 " onclick="this.disabled=true;document.inputform.submit();" class="button" type="submit">&nbsp;
        <input name="Reset" value=" 重置 " class="button" type="reset">
      </div>
    </td>
  </tr>
</tbody></table>
</form>
</div>
  

</div>
</div>

<div id="sidebar" class="sidebar">
<div id="innerSidebar">

  
  <div id="panelUser" class="panel" style="display: none;">
  <h5>用户面板</h5>
  <div class="panel-content">
    <div id="loginForm">
    <form name="login" method="post" action="http://www.rainsts.net/login.asp?act=login">
    <table cellpadding="0" cellspacing="2" width="100%">
      <tbody><tr>
        <td align="right">用户名:</td>
        <td><input value="" name="username" size="12" maxlength="24" class="text" type="text">
        </td>
      </tr>
      <tr>
        <td align="right">密码:</td>
        <td><input name="password" size="12" maxlength="16" class="text" type="password"></td>
      </tr>
      
      <tr>
        <td align="right">验证码:</td>
        <td><input value="" name="scode" size="4" maxlength="4" class="text" type="text">
        <img src="scode.asp" alt="验证码">
        </td>
      </tr>
      
      <tr>
        <td align="center">
        
        </td>
        <td>
        <input name="Login" value="  登录  " class="button" type="submit">
        </td>
      </tr>
    </tbody></table>
    </form>
    </div>
  </div>
  </div>
  

  <div id="panelCategory" class="panel">
  <h5>分类</h5>
  <div class="panel-content">
  <ul>
  <li><a href="http://www.rainsts.net/default.asp"><b>首页</b></a></li>
  
    <li><a href="http://www.rainsts.net/default.asp?cat=10">C# Language</a> [76] <a href="http://www.rainsts.net/feed.asp?cat=10" title="C# Language RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="C# Language RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=1">.NET Framework</a> [129] <a href="http://www.rainsts.net/feed.asp?cat=1" title=".NET Framework RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt=".NET Framework RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=27">WPF Silverlight</a> [26] <a href="http://www.rainsts.net/feed.asp?cat=27" title="WPF Silverlight RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="WPF Silverlight RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=16">WinForm</a> [14] <a href="http://www.rainsts.net/feed.asp?cat=16" title="WinForm RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="WinForm RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=14">ASP.NET</a> [63] <a href="http://www.rainsts.net/feed.asp?cat=14" title="ASP.NET RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="ASP.NET RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=19">ADO.NET</a> [43] <a href="http://www.rainsts.net/feed.asp?cat=19" title="ADO.NET RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="ADO.NET RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=15">Web Services</a> [4] <a href="http://www.rainsts.net/feed.asp?cat=15" title="Web Services RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="Web Services RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=21">Distributed</a> [70] <a href="http://www.rainsts.net/feed.asp?cat=21" title="Distributed RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="Distributed RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=26">Reflection CodeDom</a> [27] <a href="http://www.rainsts.net/feed.asp?cat=26" title="Reflection CodeDom RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="Reflection CodeDom RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=23">MSIL Injection</a> [43] <a href="http://www.rainsts.net/feed.asp?cat=23" title="MSIL Injection RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="MSIL Injection RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=13">AOP IoC ORM</a> [24] <a href="http://www.rainsts.net/feed.asp?cat=13" title="AOP IoC ORM RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="AOP IoC ORM RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=28">OpenSource FX</a> [19] <a href="http://www.rainsts.net/feed.asp?cat=28" title="OpenSource FX RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="OpenSource FX RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=6">Design Patterns</a> [12] <a href="http://www.rainsts.net/feed.asp?cat=6" title="Design Patterns RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="Design Patterns RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=2">Java Eclipse</a> [28] <a href="http://www.rainsts.net/feed.asp?cat=2" title="Java Eclipse RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="Java Eclipse RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=20">Dynamic Language</a> [27] <a href="http://www.rainsts.net/feed.asp?cat=20" title="Dynamic Language RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="Dynamic Language RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=30">ASM C/C++</a> [25] <a href="http://www.rainsts.net/feed.asp?cat=30" title="ASM C/C++ RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="ASM C/C++ RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=31">Database</a> [0] <a href="http://www.rainsts.net/feed.asp?cat=31" title="Database RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="Database RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=3">Search Engine</a> [30] <a href="http://www.rainsts.net/feed.asp?cat=3" title="Search Engine RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="Search Engine RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=4">Word Segment</a> [12] <a href="http://www.rainsts.net/feed.asp?cat=4" title="Word Segment RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="Word Segment RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=12">E-Commerce</a> [6] <a href="http://www.rainsts.net/feed.asp?cat=12" title="E-Commerce RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="E-Commerce RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=18">Windows Live</a> [2] <a href="http://www.rainsts.net/feed.asp?cat=18" title="Windows Live RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="Windows Live RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=29">Linux</a> [31] <a href="http://www.rainsts.net/feed.asp?cat=29" title="Linux RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="Linux RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=22">Network</a> [8] <a href="http://www.rainsts.net/feed.asp?cat=22" title="Network RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="Network RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=7">Tools</a> [47] <a href="http://www.rainsts.net/feed.asp?cat=7" title="Tools RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="Tools RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=11">Essay</a> [28] <a href="http://www.rainsts.net/feed.asp?cat=11" title="Essay RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="Essay RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=17">Cento</a> [13] <a href="http://www.rainsts.net/feed.asp?cat=17" title="Cento RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="Cento RSS Feed"></a>
    </li>
      
    <li><a href="http://www.rainsts.net/default.asp?cat=5">Misc</a> [80] <a href="http://www.rainsts.net/feed.asp?cat=5" title="Misc RSS Feed" target="_top"><img src="rss.png" class="meta-button" alt="Misc RSS Feed"></a>
    </li>
      
  </ul>
  </div>
  </div>

  <div id="panelCalendar" class="panel">
  <h5>日历</h5>
  <table id="calendar" cellspacing="1" width="100%">
<tbody><tr><td colspan="7" class="calendar-top">	<a href="http://www.rainsts.net/default.asp?date=2006-5">«</a>
	<a href="http://www.rainsts.net/default.asp?date=2007-5"><span class="calendar-year">2007</span></a>
	<a href="http://www.rainsts.net/default.asp?date=2008-5">»</a>
	&nbsp;&nbsp;
	<a href="http://www.rainsts.net/default.asp?date=2007-4">«</a>
	<a href="http://www.rainsts.net/default.asp?date=2007-5"><span class="calendar-month">5月</span></a>
	<a href="http://www.rainsts.net/default.asp?date=2007-6">»</a>
</td></tr>
<tr class="calendar-weekdays">
	<td class="calendar-weekday-cell">Su</td>
	<td class="calendar-weekday-cell">Mo</td>
	<td class="calendar-weekday-cell">Tu</td>
	<td class="calendar-weekday-cell">We</td>
	<td class="calendar-weekday-cell">Th</td>
	<td class="calendar-weekday-cell">Fr</td>
	<td class="calendar-weekday-cell">Sa</td>
</tr>
<tr>
	<td class="calendar-day-blank"></td>
	<td class="calendar-day-blank"></td>
	<td class="calendar-day">1</td>
	<td class="calendar-day"><a href="http://www.rainsts.net/default.asp?date=2007-5-2" class="calendar" title="- [WCF Transaction] 1. 基本概念
- [WCF Transaction] 2. 事务演示
- [WCF Transaction] 3. 事务投票">2</a></td>
	<td class="calendar-day"><a href="http://www.rainsts.net/default.asp?date=2007-5-3" class="calendar" title="- [WCF Transaction] 4. 事务与会话
- [WCF MSMQ] 1. 基本应用">3</a></td>
	<td class="calendar-day"><a href="http://www.rainsts.net/default.asp?date=2007-5-4" class="calendar" title="- [WCF MSMQ] 2. 队列与事务">4</a></td>
	<td class="calendar-saturday">5</td>
</tr>
<tr>
	<td class="calendar-sunday"><a href="http://www.rainsts.net/default.asp?date=2007-5-6" class="calendar" title="- WCF - 只读属性">6</a></td>
	<td class="calendar-day"><a href="http://www.rainsts.net/default.asp?date=2007-5-7" class="calendar" title="- [Castle AR] 1. Starter">7</a></td>
	<td class="calendar-day"><a href="http://www.rainsts.net/default.asp?date=2007-5-8" class="calendar" title="- [Castle AR] 2. ActiveRecord
- [Castle AR] 3. Validate">8</a></td>
	<td class="calendar-day"><a href="http://www.rainsts.net/default.asp?date=2007-5-9" class="calendar" title="- [Castle AR] 4. CRUD">9</a></td>
	<td class="calendar-day">10</td>
	<td class="calendar-day">11</td>
	<td class="calendar-saturday">12</td>
</tr>
<tr>
	<td class="calendar-sunday">13</td>
	<td class="calendar-day"><a href="http://www.rainsts.net/default.asp?date=2007-5-14" class="calendar" title="- [Castle AR] 5. Base Relations">14</a></td>
	<td class="calendar-day">15</td>
	<td class="calendar-day">16</td>
	<td class="calendar-day">17</td>
	<td class="calendar-day">18</td>
	<td class="calendar-saturday">19</td>
</tr>
<tr>
	<td class="calendar-sunday">20</td>
	<td class="calendar-day">21</td>
	<td class="calendar-day"><a href="http://www.rainsts.net/default.asp?date=2007-5-22" class="calendar" title="- Log4net 简明手册">22</a></td>
	<td class="calendar-day">23</td>
	<td class="calendar-day"><a href="http://www.rainsts.net/default.asp?date=2007-5-24" class="calendar" title="- Application.OpenForms">24</a></td>
	<td class="calendar-day"><a href="http://www.rainsts.net/default.asp?date=2007-5-25" class="calendar" title="- 分词组件 V3 版，搜索引擎组件 Beta2 即将发布
- 雨痕分词组件 V3 免费版">25</a></td>
	<td class="calendar-saturday"><a href="http://www.rainsts.net/default.asp?date=2007-5-26" class="calendar" title="- 雨痕分词组件 V4 功能规划">26</a></td>
</tr>
<tr>
	<td class="calendar-sunday">27</td>
	<td class="calendar-day"><a href="http://www.rainsts.net/default.asp?date=2007-5-28" class="calendar" title="- RPWT : 内部编译器错误">28</a></td>
	<td class="calendar-day"><a href="http://www.rainsts.net/default.asp?date=2007-5-29" class="calendar" title="- 专属方法">29</a></td>
	<td class="calendar-day">30</td>
	<td class="calendar-day"><a href="http://www.rainsts.net/default.asp?date=2007-5-31" class="calendar" title="- V3 Bug Fixed">31</a></td>
	<td class="calendar-day-blank"></td>
	<td class="calendar-day-blank"></td>
</tr>
</tbody></table>

  </div>

  <div id="panelArticle" class="panel">
  <h5>最新日志</h5>
  <div class="panel-content">
  <ul>
  
    <li><a href="http://www.rainsts.net/article.asp?id=913" title="还有完没完？">还有完没完？</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=912" title="让程序崩溃时自动生成 Core Dump">让程序崩溃时自动生成 Core D...</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=911" title="Python Essential: 1. Types and Objects (2)">Python Essential: 1. Types ...</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=910" title="Python Essential: 1. Types and Objects (1)">Python Essential: 1. Types ...</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=909" title="Core Dump">Core Dump</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=908" title="NetBeans IDE 6.8">NetBeans IDE 6.8</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=907" title="GNU Binutils">GNU Binutils</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=906" title="字符串编码方案">字符串编码方案</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=905" title="新年好！">新年好！</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=904" title="GVIM 配色方案">GVIM 配色方案</a></li>
      
  </ul>
  </div>
  </div>

  <div id="panelComment" class="panel">
  <h5>最新评论</h5>
  <div class="panel-content">
  <ul>
  
    <li><a href="http://www.rainsts.net/article.asp?id=913#comment790" title="yuhen [还有完没完？]: 
Python 挖坟停几天，等消停了再说。别扭……">Python 挖坟停几天，等消...</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=910#comment789" title="Ling [Python Essential: 1. Types and Objects (1)]: 
看懂了 [lol] 

期望老大在介绍python的时候，附带介绍些内存、汇编等基础的东西 [razz]">看懂了 [lol] 

期望老大...</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=862#comment788" title="Ling [GCC 不同优化等级效果测试]: 
a little lost [sad]">a little lost [sad]</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=863#comment787" title="Ling [GDB 调试演示]: 
Done.

 -- this is from ubuntu 9.10 [lol]">Done.

 -- this is from...</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=911#comment786" title="小叶子 [Python Essential: 1. Types and Objects (2)]: 
[lol] [lol] 抢个沙发先！！！">[lol] [lol] 抢个沙发先...</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=911#comment785" title="打渔的 [Python Essential: 1. Types and Objects (2)]: 
老大辛苦！·！！！">老大辛苦！·！！！</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=861#comment784" title="yuhen [VIM 简单自定义配置]: 
[no] 鄙视勾连回复都发洋文~~~~">[no] 鄙视勾连回复都发洋...</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=861#comment783" title="Ling [VIM 简单自定义配置]: 
Finally, I see how to save content in vim [stun]

In ubuntu, no Chinese.....very shit [stun]">Finally, I see how to s...</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=906#comment782" title="yuhen [字符串编码方案]: 
新年的第一个沙发我自己坐， [lol]">新年的第一个沙发我自己...</a></li>
      
    <li><a href="http://www.rainsts.net/article.asp?id=905#comment781" title="micyng [新年好！]: 
老大新年好 [wink]">老大新年好 [wink]</a></li>
      
  </ul>
  </div>
  </div>

  <div id="panelSearch" class="panel">
  <h5>搜索</h5>
  <div class="panel-content">
		<form name="searchForm" method="post" action="http://www.rainsts.net/article.asp?id=488" onsubmit="return doSearch();">
		<input value="" name="q" id="q" class="text search-field" type="text">
		<select name="searchType">
			<option value="articles">日志</option>
			<option value="comments">评论</option>
			<option value="guestbook">留言簿</option>
			<option value="trackbacks">引用</option>
		</select>
		<input name="submit" id="submit" value=" 搜索 " class="button" type="submit">
		</form>
  </div>
  </div>

  <div id="panelStats" class="panel">
  <h5>统计数据</h5>
  <div class="panel-content">
    日志: 887<br>
    <a href="http://www.rainsts.net/comment.asp">评论: 499</a><br>
    <a href="http://www.rainsts.net/trackback.asp?act=list">引用: 0</a><br>
    <a href="http://www.rainsts.net/user.asp">用户:  23</a><br>
    到访:  7776337<br>
    在线: 5<br>
    <br>
    <a href="http://www.rainsts.net/feed.asp" title="日志 RSS Feed" target="_top"><img src="rss_article.png" class="meta-button" alt="日志 RSS Feed"></a><br>
    <a href="http://www.rainsts.net/feed.asp?selected=true" title="推荐日志 RSS Feed" target="_top"><img src="rss_selected.png" class="meta-button" alt="推荐日志 RSS Feed"></a><br>
    <a href="http://www.rainsts.net/feed.asp?q=comment" title="评论 RSS Feed" target="_top"><img src="rss_comment.png" class="meta-button" alt="评论 RSS Feed"></a><br>
    <a href="http://www.unicode.org/" title="Unicode.org" target="_top"><img src="utf8.png" class="meta-button" alt="Unicode Encoding"></a><br>
    <a href="http://creativecommons.org/licenses/by-nc-sa/1.0/" title="Creative Commons Licensed" target="_top"><img src="cc.png" class="meta-button" alt="Creative Commons Licensed"></a><br>
    <a href="http://www.voidland.com/" title="Powered by LBS" target="_top"><img src="lbs.png" class="meta-button" alt="Powered by LBS"></a><br>
  </div>
  </div>

  <div id="panelLinks" class="panel">
  <h5>友情链接</h5>
  <div class="panel-content">
    <a href="http://www.cnblogs.com/" target="_top">博客园</a><br>
<a href="http://blog.joycode.com/" target="_top">博客堂</a><br>
<br>
<a href="http://mix-up.cnblogs.com/" target="_top">MIX-UP</a><br>
<a href="http://www.cnblogs.com/Ling2008/" target="_top">Ling</a><br>
<a href="http://www.cnblogs.com/JeremyMa/" target="_top">打渔为生</a><br>
<a href="http://hi.baidu.com/expertsearch/" target="_top">雨恨云愁</a><br>
<a href="http://www.likeshow.net/" target="_top">King's Blog</a><br>
<a href="http://jillzhang.cnblogs.com/" target="_top">jillzhang的专栏</a><br>
<a href="http://jiabao.cnblogs.com/" target="_top">平庸与杰出=加法与减法</a><br>
<a href="http://tttick.cnblogs.com/" target="_top">T.t.T!CK</a><br>
<a href="http://lbq1221119.cnblogs.com/" target="_top">lbq1221119</a><br>
<br>
<a href="http://www.jinry.com/" target="_top">金如意</a>
<br><br>
<b>MSN &amp; EMAIL</b>
<img src="09_095455_qyuhenhotmail.com.png">

<!-- Google 网站统计 -->
<br><br><br>
<a href="http://www.google.cn/analytics/zh-CN/" target="_top">Google Analytics</a>



<!-- 51Yes 访问统计 
<br>
<script language="javascript" src="http://count6.51yes.com/click.aspx?id=68722002&logo=10"></script>
-->

<!-- 站长统计 -->
<br>

  </div>
  </div>

</div>
</div>
  
<div class="clear"></div>
</div>

<div id="footer">
<div id="innerFooter">
<!-- REMOVAL OF THIS COPYRIGHT WITHOUT PERMISSION FROM THE AUTHOR WILL VIOLATE THE LICENCE YOU AGREED TO WHEN DOWNLOADING THIS SOFTWARE. -->
<!-- Copyright Start -->
Copyright © 2000-2008 RainTrail Studio.China &nbsp;All Rights Reserved!<br>
Powered by <a href="http://www.voidland.com/" target="_top">LBS Version 2.0.313</a> © 2003-2005 SiC/CYAN.<br>
<!-- Copyright End -->
<b>10 DB Queries | Proccessed in 125ms</b>
<br><a href="http://www.miibeian.gov.cn/" target="_top">京ICP备09039458号</a> 
<br><br><br><img src="yuhen2.gif">
</div>
</div>
    </div>
    </div>
  </body>
</html>
